//
//  MainViewController.swift
//  liveDemo
//
//  Created by satoshi_uma on 2020/10/20.
//  Copyright © 2020 satoshi_uma. All rights reserved.
//

import UIKit

class MainViewController: UITabBarController {
    
   
    override func viewDidLoad() {
        super.viewDidLoad()

//        let vc = UIViewController()
//        vc.view.backgroundColor = UIColor.red
//        addChild(vc)

        addChildVc(storyBoard: "Home")
        addChildVc(storyBoard: "Live")
        addChildVc(storyBoard: "Follow")
        addChildVc(storyBoard: "Profile")
    }

    private func addChildVc(storyBoard: String) {
        //        通过 storyBoard 获取控制器
        let childVc = UIStoryboard(name: storyBoard, bundle: nil).instantiateInitialViewController()!

        addChild(childVc)
    }
}
